<template>
    <div class="top">
            <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white" style="margin-top:-1.3rem;">
                <van-swipe-item>
                    <img :src="arr2[0]" alt="">
                 </van-swipe-item>
                <van-swipe-item>
                    <img :src="arr2[1]" alt="">
                </van-swipe-item>
                <van-swipe-item>
                    <img :src="arr2[2]" alt="">
                </van-swipe-item>
                <van-swipe-item>
                    <img :src="arr2[3]" alt="">
                </van-swipe-item>
            </van-swipe>
    </div>
          
</template>

<script>
import {one} from "@/api/topapi.js"
export default {
    data(){
        return{
            arr2:[]
        }
    },
   mounted(){
       one().then((ok)=>{
           this.arr2=ok.data.lunarr
       })
   }
}
</script>

<style scoped>
.top{
    width: 95%;
    position: absolute;
    top: 1.9rem;
    left: 0.1rem;
}
     .my-swipe .van-swipe-item {
    color: #fff;
    font-size: 20px;
    line-height: 150px;
    text-align: center;
    /* background-color: #39a9ed; */
    width:90%;
    height: 2.22rem;
  }
  img{
      height: 2.22rem;
    width: 100%;
    border-radius: 0.1rem;
  }
</style> 